// 背景图片
bg-image($url)
  background-image: url($url + "@2x.png")
  @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3)
    background-image: url($url + "@3x.png")

// 不换行
no-wrap()
  text-overflow: ellipsis
  overflow: hidden
  white-space: nowrap

// 扩展点击区域
extend-click()
  position: relative
  &:before
    content: ''
    position: absolute
    top: -10px
    left: -10px
    right: -10px
    bottom: -10px

// 实现1px细线
border-top-1px($color)
  position: relative
  &:after
    display: block
    position: absolute
    left: 0
    top: 0
    border-top: 1px solid $color
    width: 200%;
    content: ''
    transform-origin: 0 0
    -webkit-transform-origin: 0 0
    transform: scale(0.5)
    -webkit-transform: scale(0.5)

border-bottom-1px($color)
  position: relative
  &:after
    display: block
    position: absolute
    left: 0
    bottom: 0
    border-bottom: 1px solid $color
    width: 200%;
    content: ''
    transform-origin: 0 0
    -webkit-transform-origin: 0 0
    transform: scale(0.5)
    -webkit-transform: scale(0.5)
